package com.wing.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.common.utils.PageResult;
import com.wing.product.model.entity.WarehouseProduct;
import com.wing.product.model.entity.WarehouseProductInventory;
import com.wing.product.model.response.MoveInventoryVO;
import com.wing.product.model.response.WarehouseProductInventoryProcessVO;
import com.wing.product.model.response.WarehouseProductInventoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface WarehouseProductInventoryDao extends BaseMapper<WarehouseProductInventory> {

    List<WarehouseProductInventoryVO> selectCount(@Param("ids")List<Long> ids , @Param("productId")String productId);

    List<WarehouseProductInventoryVO> selectInventory(@Param("ids")List<Long> ids , @Param("productId")String productId);
    List<WarehouseProductInventoryVO> selectProductDetailInventory(@Param("ids")List<Long> ids);

    List<WarehouseProductInventoryVO> selectListVO(@Param("status")Integer status, @Param("qualityTestingId")Long qualityTestingId);

    List<WarehouseProductInventoryVO> findByShipmentOrderDetailId(@Param("warehouseShipmentOrderDetailId")String warehouseShipmentOrderDetailId);
    List<WarehouseProductInventoryVO> selectMaterialDetail(@Param("sysList")List<String> sysList);

    List<WarehouseProductInventoryVO> selectListOrder(@Param("spaceId")String spaceId,@Param("productId")String productId);

    List<WarehouseProductInventoryVO> selectListRecord(@Param("page")Page<WarehouseProductInventoryVO> warehouseProductInventoryVOIPage,@Param("productId")Long productId,@Param("warehouseId")String warehouseId,@Param("bundleCodeList")List<String> bundleCodeList);

    List<WarehouseProductInventoryVO> list4app(@Param("page") Page<WarehouseProduct> pg, @Param("params") Map<String,Object> paramMap);

    Integer queryUserBundleCode(@Param("ids") List<String> userBundleCodes);

    List<WarehouseProductInventoryVO> selectListVOTwo(@Param("page")Page<WarehouseProductInventoryVO> warehouseProductInventoryVOIPage
            ,@Param("warehouseProductId")String warehouseProductId
            ,@Param("warehouseId")String warehouseId,@Param("warehouseAreaId")String warehouseAreaId
            ,@Param("warehouseShelfSpaceId")String warehouseShelfSpaceId, @Param("userBundleCode")String userBundleCode,@Param("firstEntryDate")String firstEntryDate);

    WarehouseProductInventory findByInventoryId(Long inventoryId);

    List<Map> findAllIsReview(Long signId);

    List<MoveInventoryVO> factoryList();

    List<MoveInventoryVO> areaList(String warehouseId);

    List<MoveInventoryVO> spaceList(String warehouseAreaId);

    WarehouseProductInventoryVO  selectByInventoryId(String id);

    List<Map> findInventoryShipment(String id);
    List<Map> findInventorySign(String id);
    List<Map> findInventoryMove(String id);
    List<Map> findInventoryTransfer(String id);
    List<Map> findInventoryOutbound(String id);

    WarehouseProductInventoryProcessVO selectInventoryInfo(String id);


}